<?php if (!defined('THINK_PATH')) exit(); /*a:2:{s:70:"D:\phpStudy\WWW\auth/application/adminmall\view\cons_member\index.html";i:1496201820;s:64:"D:\phpStudy\WWW\auth/application/adminmall\view\public\base.html";i:1496201810;}*/ ?>
<!DOCTYPE html>
<html>

	<head>
		<meta charset="utf-8">
		<meta name="viewport" content="width=device-width, initial-scale=1.0">
		<meta name="renderer" content="webkit">
		<meta http-equiv="Cache-Control" content="no-siteapp" />
		<title>高级管理员</title>
		<meta name="keywords" content="">
		<meta name="description" content="">
		<!--[if lt IE 9]>
    	<meta http-equiv="refresh" content="0;ie.html" />
    	<![endif]-->
		<link rel="shortcut icon" href="favicon.ico">
		<link href="__CSS__/bootstrap.min.css" rel="stylesheet">
		<link href="__CSS__/font-awesome.min.css" rel="stylesheet">
		<link href="__CSS__/animate.min.css" rel="stylesheet">
		<link href="__CSS__/style.min.css" rel="stylesheet">
		<link href="__CSS__/admin.css" rel="stylesheet">
	</head>
	<body class="fixed-sidebar full-height-layout gray-bg" style="overflow:hidden">
		<div id="wrapper">
			<!--左侧导航开始-->
			<nav class="navbar-default navbar-static-side" role="navigation">
				<div class="nav-close"><i class="fa fa-times-circle"></i>
				</div>
				<div class="sidebar-collapse">
					<ul class="nav" id="side-menu">
						<li class="nav-header" style="height: 60px;padding: 0; text-align: center;line-height: 60px; color: #FFFFFF; font-size: 20px; ">
                               <strong><?php echo session('admin_name'); ?></strong>
						</li>
						<?php if(!empty($menu)): if(is_array($menu) || $menu instanceof \think\Collection): if( count($menu)==0 ) : echo "" ;else: foreach($menu as $key=>$vo): ?>
						<li class="menu">
							<a href="<?php echo $vo['name']; ?>">
								<i class="<?php echo $vo['icon']; ?>"></i>
								<span class="nav-label"><?php echo $vo['title']; ?> </span>
								<span class="fa arrow"></span>
							</a>
							<ul class="nav nav-second-level">
								<?php if(!empty($vo['children'])): if(is_array($vo['children']) || $vo['children'] instanceof \think\Collection): if( count($vo['children'])==0 ) : echo "" ;else: foreach($vo['children'] as $key=>$v): ?>
								<li>
									<a href="<?php echo url($v['name']); ?>"><?php echo $v['title']; ?></a>
								</li>
								<?php endforeach; endif; else: echo "" ;endif; endif; ?>
							</ul>
						</li>
						<?php endforeach; endif; else: echo "" ;endif; endif; ?>
					</ul>
				</div>
			</nav>
			<!--左侧导航结束-->
			<!--右侧部分开始-->
			<div id="page-wrapper" class="gray-bg dashbard-1">
				<div class="row border-bottom">
					<nav class="navbar navbar-static-top" role="navigation" style="margin-bottom: 0">
						<div class="navbar-header">
							<a class="navbar-minimalize minimalize-styl-2 btn btn-primary" href="#">
								<i class="fa fa-bars"></i>
							</a>
						</div>
						<ul class="nav navbar-top-links navbar-left">
							<li class="hidden-xs" id='shouye'>
							<a href="<?php echo url('admin/index/index'); ?>">
								&nbsp;&nbsp;<i class="fa fa-home"></i>首页&nbsp;&nbsp;
							</a>
							</li>
							<li class="hidden-xs">
								<a href=<?php echo url('adminmall/UnionStore/index'); ?>>
									<i class="fa fa-users"></i>联盟商家</a>
							</li>
							<li>
								<a href=<?php echo url('adminmall/ConsMember/index',array('active'=>1)); ?>><i class="fa fa-user"></i>合伙人</a>
							</li>
							<li>
								<a href=<?php echo url('admin/Member/index',array('active'=>2)); ?>><i class="fa fa-user-plus"></i>加盟商申请</a>
							</li>
							<li>
								<a href=<?php echo url('adminmall/Scorec/index',array('active'=>3)); ?>><i class="fa fa-yen"></i>提现申请</a>
							</li>
							<li>
								<a href=<?php echo url('adminmall/Order/index',array('active'=>6)); ?>><i class="fa fa-shopping-cart"></i>订单管理</a>
							</li>
						</ul>
						<ul class="nav navbar-top-links navbar-right">
							<li class="hidden-xs">
								<a href="<?php echo url('system/clear'); ?>">
									<i class="fa fa-refresh"></i>清除缓存
								</a>
							</li>
							<li class="hidden-xs">
								<a href="<?php echo url('login/logout'); ?>"><i class="fa fa-sign-out"></i>退出系统</a>
							</li>
						</ul>
					</nav>
				</div>
				<div class="row">
					
<div class="content-tabs">
	<ol class="breadcrumb">
		<li>
			<a href="<?php echo url('index/index'); ?>"><i class="fa fa-home"></i></a>
		</li>
		<li><strong>消费会员列表</strong></li>
	</ol>
</div>
<div class="ibox float-e-margins">
	<div class="ibox-content">
		<form id="myForm" class="form-horizontal m-t" method="post" action="<?php echo url('index'); ?>">	
			<div class="form-group">
				用户名 <input type="text" id="realname" name="realname" value="" placeholder="请输入用户名称" class="bank" />
				手机号码 <input type="text" id="mobile" name="mobile" value="" placeholder="请输入手机号" class="bank" />		
				用户类型<input type="text" id="agent_type" name="agent_type" value="" placeholder="" class="bank" />
				开始时间 <input id='start_time' name='add_time'style="width: 100px;"  onclick='WdatePicker()' type='text' placeholder="开始时间" class="bank" />
				至<input id='end_time' name='end_time'  style="width: 100px;" onclick='WdatePicker()' type='text' placeholder="结束时间" class="bank" />
				<span ><button type="submit" class="btn btn-sm btn-primary"><li class="fa fa-search"> 查询</li></button> </span>
				<a href="<?php echo url('export'); ?>" class="btn btn-primary btn-outline">导出会员信息</a></span>			
			</div>
		</from>
		<div class="hr-line-dashed"></div>
		<div class="example-wrap">
			<div class="example">
				<form method="post" action="<?php echo url('index'); ?>">
					<table class="table table-bordered table-hover">
						<thead>
							<tr class="long-th">					
								<th>用户名</th>
								<th>手机号码</th>
								<th>用户类型</th>
								<th>系统拥有量</th>
								<th>系统销量</th>
								<th>申请时间</th>								
								<th>操作</th>
							</tr>
						</thead>
						<tbody>
							<?php if(is_array($list) || $list instanceof \think\Collection): if( count($list)==0 ) : echo "" ;else: foreach($list as $key=>$vo): ?>
							<tr>
								<td class="text-center"><?php echo $vo['real_name']; ?></td>
								<td class="text-center"><?php echo $vo['mobile']; ?></td>
								<td class="text-center"><?php if($vo['m'] == 2): ?>
                        			合伙人							
                        			<?php elseif($vo['a'] == 3): ?>
                        			普通商家
                        			<?php elseif($vo['a'] == 4): ?>
                        			加盟商
                        			<?php elseif($vo['m'] == 1): ?>
                        			代理商
                        			<?php endif; ?>
                        			</td>
                        		<td class="text-center">
                        			<?php if($vo['m'] == 2): ?>
                        			<?php echo $vo['stock']; ?>
									<input type="button" value="增加库存" id="jifen"class="btn btn-primary bnt-sm"onclick="edit(<?php echo $vo['id']; ?>)">
									<?php else: ?>
									<?php echo $vo['stock']; endif; ?>
                        		</td>
                        		<td class="text-center"><?php echo $vo['stock_sale']; ?></td>
								<td class="text-center"><?php echo $vo['time']; ?></td>
								<td class="text-center">
									<?php if($vo['m'] == 2): ?>
									<a href="#" class="btn btn-danger bnt-sm ">已经通过</a>
										<?php else: ?>
										<a href="<?php echo url('is_pt',['id'=>$vo['id'], 'agent_type'=>$vo['m'],'is_partner'=>'2']); ?>" class="btn btn-primary ">
										同意</a>
										<a href="<?php echo url('is_pt',['id'=>$vo['id'],'agent_type'=>$vo['m'], 'is_partner'=>'3']); ?>" class="btn btn-danger bnt-sm ">
										拒绝</a>
										<?php endif; ?>
							</tr>
							<?php endforeach; endif; else: echo "" ;endif; ?>
						</tbody>
					</table>
					<div style="text-align: right;">
                      <?php echo $list->render(); ?>
                    </div>
				</form>
			</div>
		</div>
	</div>
</div>

<script src="__LIB__/datepicker/WdatePicker.js"></script>
<script>
	
	function edit(id){
		var tel=parent.layer.prompt({title: '输入增加的库存',formType: 0}, 
	    function(integral){layer.open({content: '确认添加的库存为'+integral+'？',
					btn: ['确认', '取消'],yes: function(index, layero) {window.location.href='integral/id/'+id+'/kucun/'+integral;},
													btn2: function(index,layero) {},
						                        cancel: function() {
						                            //右上角关闭回调  
						                      }
				});
			});
		
	}

	</script>

				</div>
			</div>
			<!--右侧部分结束-->
		</div>
		<div class="footer">
			<div class="pull-right"> 版权所有CMS Project &copy; 2017-2020 版权所有</div>
		</div>
		<script src="__JS__/jquery.min.js"></script>
		<script src="__JS__/bootstrap.min.js"></script>
		<script src="__JS__/jquery.metisMenu.js"></script>
		<script src="__JS__/jquery.slimscroll.min.js"></script>
		<script src="__LIB__/layer/layer.js"></script>
		<script src="__JS__/core.min.js"></script>
		<script src="__JS__/pace.min.js"></script>
		<script src="__JS__/help.js"></script>
		<script>
			// 文件上传URL
			var __UPLOAD_URL__ = "<?php echo url('admin/upload/index'); ?>";
			var __CURRENT_URL__ = "<?php echo $current_url; ?>";
		</script>
		<script src="__JS__/admin.js"></script>
		<script>
			var show="<?php echo $is_show_left; ?>";
			if(show==0){
				$("body").toggleClass("mini-navbar"), SmoothlyMenu();
			}
		</script>
		
<style>
.bank{
	width: 150px;
    height:30px;
    text-align:center;
    border-radius:5px;
}
</style>

	</body>

</html>